Optimal. Leaf size=37 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {b x^2+a x^n}}\right )}{\sqrt {b} (2-n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2004, 2033,
212} \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a x^n+b x^2}}\right )}{\sqrt {b} (2-n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2004
Rule 2033
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {x^n \left (a+b x^{2-n}\right )}} \, dx &=\int \frac {1}{\sqrt {b x^2+a x^n}} \, dx\\ &=\frac {2 \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {b x^2+a x^n}}\right )}{2-n}\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {b x^2+a x^n}}\right )}{\sqrt {b} (2-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(78\) vs. \(2(37)=74\).
time = 0.07, size = 78, normalized size = 2.11 \begin {gather*} -\frac {2 \sqrt {a} x^{n/2} \sqrt {1+\frac {b x^{2-n}}{a}} \sinh ^{-1}\left (\frac {\sqrt {b} x^{1-\frac {n}{2}}}{\sqrt {a}}\right )}{\sqrt {b} (-2+n) \sqrt {b x^2+a x^n}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \frac {1}{\sqrt {x^{n} \left (a +b \,x^{2-n}\right )}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {x^{n} \left (a + b x^{2 - n}\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.21, size = 67, normalized size = 1.81 \begin {gather*} \frac {\sqrt {a}\,x^{n/2}\,\mathrm {asin}\left (\frac {\sqrt {b}\,x^{1-\frac {n}{2}}\,1{}\mathrm {i}}{\sqrt {a}}\right )\,\sqrt {\frac {b\,x^{2-n}}{a}+1}\,1{}\mathrm {i}}{\sqrt {b}\,\left (\frac {n}{2}-1\right )\,\sqrt {a\,x^n+b\,x^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________